-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: ndatabase Refactor #7194
base: master
Are you sure you want to change the base?
WIP: ndatabase Refactor #7194
Conversation
- Also fixes failing build, although the entities as-is are not going to work
- Added a parent sql adapter class to handle the common behavior between the different adapters
cd35b40
to
42fef1d
Compare
- Less datum creation and entity does not care about static typing any way, can just iterate thru entity meta datum to get field types and any other field metadata
This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself |
About the pull request
Refactoring ndatabase to be a bit more readable and redefining the interface for defining entities, entity links, and views to reduce boiler plate. Using field and field type datums to validate that appropriate fields and field types are passed.
Also adding unit tests to validate views and links at the very list.
Will try to document what is going on with ndatabase since variable name changes might not be sufficient in that front.
Feedback from those more familiar with how this works is much appreciated.
TODO
Implementation
internal_parse_column
andinternal_generate_view_query
so thatmeta_to_load
maps entity nodes to table namesDocumentation
meta_to_load
andmeta_to_table
variable names to more clearly reflect what they represent in adaptersinternal_parse_column
andinternal_generate_view_query
since aliasing is not very clear without digging into the codeValidation
Misc
Nice to have's (will probably do these changes in separate PRs to avoid scope creep)
Explain why it's good for the game
With datumized preferences port I am planning to do would like to try storing all preferences in the database instead of through savefiles. Wanted the DB to be a lot easier to work with before diving into that.
Testing Photographs and Procedure
Screenshots & Videos
tba
Changelog
no player facing changes